#!/usr/bin/env python

import wx
import resource.dimen as dimen

class Message(wx.TextCtrl):
    '''Message class
    
    @author Julot <andy.julot@gmail.com>
    @since Thursday, February 16, 2012. 10:48 AM'''
    
    def __init__(self, parent):
        style = wx.TE_MULTILINE | wx.TE_READONLY
        wx.TextCtrl.__init__(self, parent, style=style)
    
    _model = None
    
    @property
    def model(self):
        return self._model
    
    @model.setter
    def model(self, value):
        self._model = value
        
        if value:
            self.Value = str(value.completeMessage)
        else:
            self.Value = ''